
"ui";

const apis0= [{ name: "玩的嗨", url: "http://tv.wandhi.com/go.html?url=" },
{ name: "思古解析", url: "http://api.bbbbbb.me/jx/v.php?url=" },
{ name: "思古解霸", url: "http://api.bbbbbb.me/jx/?url=" },
{ name: "百域解析", url: "http://app.baiyug.cn:2019/vip/?url=" },
{ name: "猫云(xxx)", url: "https://jx.maoyun.tv/index.php?id=" },
{ name: "搜你妹", url: "http://www.sonimei.cn/?url=" },
{ name: "噗噗电影", url: "http://pupudy.com/play?make=url&id=" },
{ name: "酷绘", url: "http://appapi.svipv.kuuhui.com/svipjx/liulanqichajian/browserplugin/qhjx/qhjx.php?id=" },
{ name: "旋风解析", url: "http://api.xfsub.com/index.php?url=" },
{ name: "石头解析", url: "https://jiexi.071811.cc/jx.php?url=" },
{ name: "VIP看看", url: "http://q.z.vip.totv.72du.com/?url=" },
{ name: "ODFLV", url: "http://aikan-tv.com/?url=" },
{ name: "163人", url: "http://jx.api.163ren.com/vod.php?url=" },
{ name: "CKFLV", url: "http://www.0335haibo.com/tong.php?url=" },
{ name: "无名小站2", url: "http://www.wmxz.wang/video.php?url=" },
{ name: "眼睛会下雨", url: "http://www.vipjiexi.com/yun.php?url=" },
{ name: "1008影视", url: "http://api.1008net.com/v.php?url=" },
{ name: "人人发布", url: "http://v.renrenfabu.com/jiexi.php?url=" },
{ name: "无广告接口1", url: "http://59uv.com/?url=" },
{ name: "无广告接口2", url: "http://69p.top/?url=" },
{ name: "无广告接口3", url: "http://74t.top/?url=" },
{ name: "无广告接口4", url: "http://mimijiexi.top/?url=" },
{ name: "无广告接口5", url: "http://55jx.top/?url=" },
{ name: "无广告接口6", url: "http://playx.top/?url=" },
{ name: "无广告接口7", url: "http://nitian9.com/?url=" },
{ name: "无广告接口8", url: "http://19g.top/?url=" },
{ name: "无广告接口9", url: "http://607p.com/?url=" },
{ name: "无广告接口10", url: "http://52088.online/?url=" },
{ name: "无广告接口11", url: "http://bofang.online/?url=" },
{ name: "无广告接口12", url: "http://play1.online/?url=" },
{ name: "无广告接口13", url: "http://ckplay.online/?url=" },
{ name: "无广告接口14", url: "http://api.baiyug.vip/?url=" },
{ name: "无广告接口15", url: "http://880kan.com/?url=" },
{ name: "无广告接口16", url: "https://www.kkflv.com/?url=" },
{ name: "无广告接口17", url: "https://api.okjx.cc:666/jx.php?url=" }];
const apis = [
    { name: "初心解析", url: "http://jx.bwcxy.com/?v=" },
    { name: "初颜解析", url: "http://jx.wodym.cn/?url=" },
    { name: "Hk解析", url: "http://jx.rdhk.net/?v=" },
    { name: "知网解析", url: "http://www.xyyh.xyz/zwjx/?url=" },
    { name: "星空解析", url: "https://jx.fo97.cn/?url=" },
    { name: "全网vip", url: "https://play.fo97.cn/?url=" },
    { name: "360dy解析", url: "http://yun.360dy.wang/jx.php?url=" },
    { name: "小蒋极致", url: "https://www.kpezp.cn/jlexi.php?url=" },
    { name: "维多解析（超清）", url: "https://jx.ivito.cn/?url=" },
    { name: "云梦2", url: "http://app.hoptc.cn/dyjx.php?url=" },
    { name: "tv920解析", url: "https://api.tv920.com/vip/?url=" },
    { name: "89免费解析", url: "http://www.ka61b.cn/jx.php?url=" },
    { name: "下视频", url: "http://www.xiashipin.net/?url=" },
    { name: "智库解析", url: "http://www.guandianzhiku.com/v/s/?url=" },
    { name: "逆天解析", url: "http://nitian9.com/?url=" },
    { name: "羊分享", url: "http://buchi.me/?v=" },
    { name: "爱分享", url: "http://api.iifen.top/?v=" },
    { name: "XyPlayer解析", url: "http://jx.xyplay.vip/?url=" },
    { name: "豪华啦", url: "http://api.lhh.la/vip/?url=" },
    { name: "40解析", url: "https://jx40.net/url=" },
    { name: "无名影视", url: "http://api.51ds.shop/jx/?url=" },
    { name: "宿命解析", url: "http://api.sumingys.com/index.php?url=" },
    { name: "ZLVIP", url: "https://vip.zlkkk.shop/2019/?url=" },
    { name: "8B解析", url: "http://api.8bjx.cn/?url=" },
    { name: "千忆解析", url: "https://v.qianyicp.com/v.php?url=" },
    { name: "梦城", url: " https://mcncn.cn/?url=" },
    { name: "114解析", url: "https://jx.f41.cc/?url=" },
    { name: "解析系统", url: "https://www.ckmov.vip/api.php?url=" },
    { name: "超清干货", url: "http://k8aa.com/jx/index.php?url=" },
    { name: "七星解析1", url: "http://api.greatchina56.com/?url=" },
    { name: "bl解析", url: "https://vip.bljiex.com/?v=" },
    { name: "熊猫解析", url: "http://111ys.cn/111/?url=" },
    { name: "穷二代", url: "http://jx.ejiafarm.com/x/jiexi.php?url=" },
    { name: "517解析", url: "http://cn.bjbanshan.cn/jx.php?url=" },
    { name: "千亿", url: "https://v.qianyicp.com/v.php?url=" },
    { name: "小视频", url: "http://www.xiashipin.net/?url=" },
    { name: "52解析", url: "http://apk.528kan.cn/index.php?url=" },
    { name: "丸酷解析", url: "https://wq66.cn/?url=" },
    { name: "智能解析", url: "https://jx.qppyy.com/jx/?url=" },
    { name: "618戈", url: "http://jx.618ge.com/?url=" },
    { name: "凉城解析", url: "http://jx.mw0.cc/?url=" },
    { name: "解析", url: "http://69p.top/?url=" },
    { name: "播大大", url: "https://vip.bddjx.com/?url=" },
    { name: "大亨解析", url: "http://jx.cesms.cn/?url=" },
    { name: "赵先森", url: "https://jx.zhaodh.top/?v=" },
    { name: "宏伟解析", url: "http://www.cqhwdnwx.com/jx/?url=" },
    { name: "地久天长", url: "http://www.lexiangsj.xyz/?v=" },
    { name: "47解析", url: "http://jx.nxnns47.cf/?v=" },
    { name: "1ff1解析", url: "http://jx.1ff1.cn/?url=" },
    { name: "116kan", url: "http://vip.116kan.com/?url=" },
    { name: "弦易阁", url: "http://jx.hongyishuzhai.com/index.php?url=" },
    { name: "55解析", url: "http://55jx.top/?url=" },
    { name: "七星", url: "http://qx.c7776.com/v3/?v=" },
    { name: "128解析", url: "https://jx.128sp.com/jxjx/?url=" },
    { name: "19解析", url: "http://19g.top/?url=" },
    { name: "无极速", url: "http://jx.6666txt.com/?url=" },
    { name: "云易1", url: "http://app.baiyug.cn:2019/vip/?url=" },
    { name: "云易2", url: "https://vip.bddjx.com/?url=" },
    { name: "秒播解析", url: " http://www.cuan.la/?url=" },
    { name: "265解析", url: "https://vod.265ks.com/vod/index.php?url=" },
    { name: "1969解析", url: "http://ys.1969com.cn/?url=" },
    { name: "优奇高速稳定", url: "https://jx.youqi.tw/v.php?url=" },
    { name: "云解析", url: "https://api.3456yun.com/?url=" },
    { name: "热点解析", url: "http://jx.rdhk.net/?v=" },
    { name: "ha12解析", url: "http://py.ha12.xyz/sos/index.php?url=" },
    { name: "9酷解析", url: "https://jx.9ku.wang/9ku/?url=" },
    { name: "冰河解析", url: "http://jx.duzhiqiang.com/?url=" },
    { name: "智能解析", url: "https://lany.lzure.kim/?v=" },
    { name: "狸猫解析", url: "http://111jx.xyz/?url=" },
    { name: "云解析", url: "http://gege.ha123.club/gege1234/index.php?url=" },
    { name: "清风明月", url: "http://fateg.xyz/?url=" },
    { name: "花语有你", url: "http://api.huahuay.com/?url=" },
    { name: "综合线路⑨", url: "http://www.85105052.com/admin.php?url=" },
    { name: "综合线路⑫", url: "http://www.82190555.com/video.php?url=" },
    { name: "综合线路②", url: "http://jx.598110.com/duo/index.php?url=" },
    { name: "综合线路①", url: "http://jx.598110.com/index.php?url=" },
    { name: "优酷 稳定", url: "http://le.206dy.com/vip.php?url=" },
    { name: "腾讯 ☆ 爱奇艺 √ 优酷", url: "http://api.hlglwl.com/jx.php?url=" },
    { name: "通用vip接口3", url: "http://www.1717yun.com/jx/ty.php?url=" },
    { name: "玩的嗨—2", url: "http://api.sigujx.com/?url=" },
    { name: "玩的嗨—3", url: "http://2gty.com/apiurl/yun.php?url=" },
    { name: "玩的嗨—7", url: "http://api.bbbbbb.me/jx/?url=" },
    { name: "玩的嗨—8", url: "http://beaacc.com/api.php?url=" },
    { name: "玩的嗨—12", url: "https://jiexi.071811.cc/jx.php?url=" },
    { name: "玩的嗨—13", url: "https://jx.618g.com/?url=" },
    { name: "玩的嗨—14", url: "http://www.luckyblank.cn/wuxinjx/?url=" },
    { name: "玩的嗨—15", url: "http://api.smq1.com/?url=" },
    { name: "玩的嗨—16", url: "http://17kyun.com/api.php?url=" },
    { name: "玩的嗨—17 ", url: "http://api.pucms.com/jx/api/?url=" },
    { name: "玩的嗨—18", url: "http://app.baiyug.cn:2019/vip/?url=" },
    { name: "玩的嗨—19", url: "https://030e.com/0302/?url=" },
    { name: "玩的嗨—20", url: "https://api.xiguaimg.com/odflv105/index.php?url=" },
    { name: "玩的嗨—21", url: "https://000o.cc/jx/ty.php?url=" },
    { name: "玩的嗨—22", url: "https://ejiafarm.com/jx.php?url=" },
    { name: "玩的嗨—23", url: "https://player.baodai.org/ipsign/player.php?v=" },
    { name: "玩的嗨—24", url: "http://www.1717yun.com/jx/ty.php?url=" },
    { name: "玩的嗨—25", url: "https://jqaaa.com/jx.php?url=" },
    { name: "玩的嗨—28", url: "https://z1.m1907.cn/?jx=" },
    { name: "玩的嗨—29", url: "http://jx.aeidu.cn/index.php?url=" },
    { name: "玩的嗨—30", url: "http://vip.jlsprh.com/v/4.php?url=" },
    { name: "玩的嗨—31", url: "http://jx.hanximeng.com/api.php?url=" },
    { name: "玩的嗨—33", url: "http://jx.598110.com/?url=" },
    { name: "玩的嗨—34", url: "http://jx.618ge.com/?url=" },
    { name: "玩的嗨—36", url: "http://jx.cesms.cn/?url=" },
    { name: "玩的嗨—37", url: "https://www.myxin.top/jx/api/?url=" },
    { name: "玩的嗨—39", url: "https://beaacc.com/api.php?url=" },
    { name: "玩的嗨—40", url: "https://jx.hezeshi.net/ce/jlexi.php?url=" },
    { name: "玩的嗨—41", url: "http://py.ha12.xyz/sos/index.php?url=" },
    { name: "玩的嗨—42", url: "https://jx.128sp.com/jxjx/?url=" },
    { name: "玩的嗨—43", url: "http://okjx.cc/?url=" },
    { name: "玩的嗨—44", url: "http://api.bingdou.net/?url==" },
    { name: "玩的嗨—45", url: "http://vip.wandhi.com/?v=" },
    { name: "玩的嗨—46", url: "https://www.1717yun.com/jx/ty.php?url=" },
    { name: "玩的嗨—47", url: "https://api.sigujx.com/?url=" },
    { name: "玩的嗨—48", url: "https://vip.jaoyun.com/index.php?url=" },
    { name: "玩的嗨—49", url: "https://api.bbbbbb.me/jx/?url=" },
    { name: "玩的嗨—50", url: "https://jx.wslmf.com/?url=" },
    { name: "玩的嗨—53", url: "https://jiexi.071811.cc/jx2.php?url=" },
    { name: "玩的嗨—55", url: "http://jx.kukan.vip/?url=" },
    { name: "玩的嗨—56", url: "http://demo.baores.com/?url" },
    { name: "玩的嗨—56", url: "https://jx.70808.net/?url=" },
    { name: "玩的嗨—56", url: "https://www.urlkj.com/?url=" },
    { name: "玩的嗨—54-B站", url: "https://jiexi.380k.com/?url=" },
    { name: "玩的嗨—57-B站", url: "https://www.sounm.com/?url=" },
    { name: "玩的嗨—58-B站", url: "https://api.69ne.com/?url=" },
    { name: "玩的嗨—59-B站", url: "https://jx.688ing.com/?search=" },
    { name: "玩的嗨—60-B站", url: "https://jx.shunyiwenxiu.com/?url=" }
];
const tipArr = { pop: "1.反馈问题会上传您的设备信息\n2.提交的设备信息仅用于分析BUG\n3.提交问题可以帮助开发者能更快的找出BUG\n4.不介意这些的 点下面的发送\n\n\n                     感谢您的支持💕💕💕💕", Examples: "起早贪黑\n闻鸡起舞\n默默无闻\n精卫填海\n一叶障目", tip: "功能使用教程\n1.在此区域输入要查询的成语，可批量查询（一个成语一行，具体看可以看示例\n2.\"历史\"查看刚才查询的成语，有时候查询失败，可以点历史在查询一遍\n3.长按 \"历史\"可以查看  \"保存\"的文件\n4.“保存”可以把输入框中的内容进行保存，默认路径在\"/sdcard/成语意思.txt\"\n5.长按 \"保存\"把此区域的文本复制\n6.\“导入\”可以把提前编辑好的成语(一个成语一行)导入查看或查询，默认导入路径\"/sdcard/成语.txt\"\n7.“示例”批量查询成语及导入的标准格式\n\n \n       此脚本并不完美，有兴趣可自行修改\n ", url: "https://www.microsofttranslator.com/bv.aspx?from=&to=zh-CHS&a=", jx: "http://q.z.vip.totv.72du.com/?url=", music_down: "/sdcard/music/", word: "汽车", img_path: "/sdcard/Download/" };

var apis2 = [];

ui.layout(
    <frame background="#ff555555">
        <ScrollView>
            <vertical align="top" margin="1">
                <webview w="359" h="260" size="5" id="webview" margin="0 0 1 0" />
                <input id="text" w="359" h="0" size="10" bg="#ffffff" margin="0 1 1 0" hint="网页代码区" />
                <linear>
                    <input id="awz" w="242" h="55" size='8' hint="vip视频网址。" bg="#ffcccccc" />
                    <button h="55" w="60" id="azt" text="粘贴" />
                    <button h="55" w="60" id="aok" text="解析" />
                </linear>
                <linear>
                    <button h="55" w="140" id="adk" text="浏览器打开" />
                    <button h="55" w="120" id="afz" text="复制网址" />
                </linear>
                <text text="一个接口不行,就试试其他的接口" />
                <text id="url" />
                <grid id="xz" spanCount="4" h="*">
                    <text text="{{name}}" bg="#ffcccccc" margin="1 1" />
                </grid>
                <text text="1.由于解析的网站有广告，会严重影响观看体验，所以建议用via，米虾等带有视频嗅探的浏览器，这样还可以用下载工具把视频下载下来。" textSize="17sp" margin="10 1 1 10" />
                <text text="2.无广告接口，可以直接解析出视频播放地址（M3U8文件），在本软件体验效果极差，请用浏览器打开，然后观看或者下载" textSize="17sp" margin="10 1 1 10" />
                <text text="      " margin="10 0 0 10" />
            </vertical>
        </ScrollView>
    </frame>
);
initList();
function initList() {
    ui.awz.text("http://m.iqiyi.com/v_19rr8u75c0.html");
    let jx = tipArr.jx;
    ui.aok.click(() => {
        threads.start(function () {
            let str = ui.awz.text();
            if (str) {
                ui.run(function () {
                    ui.webview.loadUrl(jx + ui.awz.text());
                });
                log("网址"+jx + ui.awz.text());
                str = http.get(jx + ui.awz.text()).body.string();
                log("网页body："+str);
                // ui.run(function () {
                //     ui.text.text(str);
                // });
            }
        });
    });

    ui.afz.click(() => {
        threads.start(function () {
            setClip(jx + ui.awz.text());
        });
    });

    ui.azt.click(() => {
        ui.awz.text(getClip());
    });
    ui.adk.click(() => {
        threads.start(function () {
            app.openUrl(jx + ui.awz.text());
        });
    });

    ui.xz.on("item_click", function (j, item, itemView, listView) {
        for (i = 0; i < apis.length; i++) {
            if (i == item) {
                apis2[i].name = "●" + apis[i].name;
            } else {
                apis2[i].name = "○" + apis[i].name;
            }
        }
        ui.xz.setDataSource(apis2);

        jx = j.url;
        ui.url.text(jx);
    });

    for (i = 0; i < apis.length; i++) {
        apis2[i] = {
            name: apis[i].name,
            url: apis[i].url
        };
        apis2[i].name = "○" + apis[i].name;
    }
    ui.xz.setDataSource(apis2);
}
var vip = {
    ui: ui.inflate(
        <frame background="#ff555555">
            <ScrollView>
                <vertical align="top" margin="1">
                    <webview w="359" h="260" size="6" id="webview" margin="0 0 1 0" />
                    <input id="text" w="359" h="0" size="10" bg="#ffffff" margin="0 1 1 0" hint="网页代码区" />
                    <linear>
                        <input id="awz" w="242" h="55" size='8' hint="vip视频网址。" bg="#ffcccccc" />
                        <button h="55" w="60" id="azt" text="粘贴" />
                        <button h="55" w="60" id="aok" text="解析" />
                    </linear>
                    <linear>
                        <button h="55" w="140" id="adk" text="浏览器打开" />
                        <button h="55" w="120" id="afz" text="复制网址" />
                    </linear>
                    <text text="一个接口不行,就试试其他的接口" />
                    <grid id="xz" spanCount="4" h="*">
                        <text text="{{name}}" bg="#ffcccccc" margin="1 1" />
                    </grid>
                    <text id="url" />
                    <text text="1.由于解析的网站有广告，会严重影响观看体验，所以建议用via，米虾等带有视频嗅探的浏览器，这样还可以用下载工具把视频下载下来。" textSize="17sp" margin="10 1 1 10" />
                    <text text="2.无广告接口，可以直接解析出视频播放地址（M3U8文件），在本软件体验效果极差，请用浏览器打开，然后观看或者下载" textSize="17sp" margin="10 1 1 10" />
                    <text text="本脚本由  。0  提供" margin="10 0 0 10" />
                </vertical>
            </ScrollView>
        </frame>
    ),
    initList: function () {
        ui.awz.text("http://m.iqiyi.com/v_19rr8u75c0.html");
        let jx = tipArr.jx;
        ui.aok.click(() => {
            threads.start(function () {
                let str = ui.awz.text();
                if (str) {
                    ui.run(function () {
                        ui.webview.loadUrl(jx + ui.awz.text());
                    });
                    str = http.get(jx + ui.awz.text()).body.string();
                    ui.run(function () {
                        ui.text.text(str);
                    });
                }
            });
        });

        ui.afz.click(() => {
            threads.start(function () {
                setClip(jx + ui.awz.text());
            });
        });

        ui.azt.click(() => {
            ui.awz.text(getClip());
        });
        ui.adk.click(() => {
            threads.start(function () {
                app.openUrl(jx + ui.awz.text());
            });
        });

        ui.xz.on("item_click", function (j, item, itemView, listView) {
            for (i = 0; i < apis.length; i++) {
                if (i == item) {
                    apis2[i].name = "●" + apis[i].name;
                } else {
                    apis2[i].name = "○" + apis[i].name;
                }
            }
            ui.xz.setDataSource(apis2);

            jx = j.url;
            ui.url.text(jx);
        });

        for (i = 0; i < apis.length; i++) {
            apis2[i] = {
                name: apis[i].name,
                url: apis[i].url
            };
            apis2[i].name = "○" + apis[i].name;
        }
        ui.xz.setDataSource(apis2);
    }, activate: function () {
        setContainer(this.ui);
        if (!this.inited) this.initList();
        this.inited = true;
    }
}